Magento 2 API Add Shipping Information To Cart For Guest Customer
ENDPOINT : /rest/V1/guest-carts/{cartId}/shipping-information
e.g : http://localhost.magento.com/rest/V1/guest-carts/DnsT4UjkMPPdID4K53h4ToaXMSElc8pI/shipping-information
METHOD : POST
HEADERS : Content-Type application/json
Authorization : Bearer
PAYLOAD:
{ "addressInformation": {
"shipping_address": {
"region": "New York",
"region_id": 43,
"region_code": "NY",
"country_id": "US",
"street": [
"123 Oak Ave"
],
"postcode": "35004",
"city": "Purchase",
"firstname": "Jane",
"lastname": "Doe",
"email": "jdoe@example.com",
"telephone": "512-555-1111"
},
"billing_address": {
"region": "New York",
"region_id": 43,
"region_code": "NY",
"country_id": "US",
"street": [
"123 Oak Ave"
],
"postcode": "35004",
"city": "Purchase",
"firstname": "Jane",
"lastname": "Doe",
"email": "jdoe@example.com",
"telephone": "512-555-1111"
},
"shipping_carrier_code": "freeshipping",
"shipping_method_code": "freeshipping"
}
}
// We are passing shipping and billing address with shipping code. You can change the address as well as shipping method of your choice
Response :
{
"payment_methods": [
{
"code": "cashondelivery",
"title": "Cash On Delivery"
},
{
"code": "banktransfer",
"title": "Bank Transfer Payment"
},
{
"code": "checkmo",
"title": "Check / Money order"
}
],
"totals": {
"grand_total": 27,
"base_grand_total": 27,
"subtotal": 32,
"base_subtotal": 32,
"discount_amount": -5,
"base_discount_amount": -5,
"subtotal_with_discount": 27,
"base_subtotal_with_discount": 27,
"shipping_amount": 0,
"base_shipping_amount": 0,
"shipping_discount_amount": 0,
"base_shipping_discount_amount": 0,
"tax_amount": 0,
"base_tax_amount": 0,
"weee_tax_applied_amount": null,
"shipping_tax_amount": 0,
"base_shipping_tax_amount": 0,
"subtotal_incl_tax": 32,
"shipping_incl_tax": 0,
"base_shipping_incl_tax": 0,
"base_currency_code": "USD",
"quote_currency_code": "USD",
"items_qty": 1,
"items": [
{
"item_id": 26,
"price": 32,
"base_price": 32,
"qty": 1,
"row_total": 32,
"base_row_total": 32,
"row_total_with_discount": 0,
"tax_amount": 0,
"base_tax_amount": 0,
"tax_percent": 0,
"discount_amount": 0,
"base_discount_amount": 0,
"discount_percent": 0,
"price_incl_tax": 32,
"base_price_incl_tax": 32,
"row_total_incl_tax": 32,
"base_row_total_incl_tax": 32,
"options": "[]",
"weee_tax_applied_amount": null,
"weee_tax_applied": null,
"name": "Strive Shoulder Pack"
}
],
"total_segments": [
{
"code": "subtotal",
"title": "Subtotal",
"value": 32
},
{
"code": "discount",
"title": "Discount (You Save)",
"value": -5
},
{
"code": "shipping",
"title": "Shipping & Handling (Free Shipping - Free)",
"value": 0
},
{
"code": "tax",
"title": "Tax",
"value": 0,
"extension_attributes": {
"tax_grandtotal_details": []
}
},
{
"code": "testdiscount",
"title": "Discount (You Save)",
"value": -5
},
{
"code": "grand_total",
"title": "Grand Total",
"value": 27,
"area": "footer"
}
]
}
} // return all the available payment methods with cart information
Thank you for sharing a bunch of this quality contents, I have bookmarked your blog. Please also explore advice from my site. I will be back for more quality contents. 메이저사이트
Thanks for your post. I’ve been thinking about writing a very comparable post over the last couple of weeks, I’ll probably keep it short and sweet and link to this instead if thats cool. Thanks. 명품사이트
Join ALEXISTOGEL, the ultimate destination for Hong Kong Togel enthusiasts, and experience the thrill of online lottery gaming. With accurate predictions and seamless gameplay, success is inevitable. bandar togel
I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article...additional info
Great things you’ve always shared with us. Just keep writing this kind of posts.The time which was wasted in traveling for tuition now it can be used for studies.Thanks rotating residential proxies
Discover the world of health and wellness through VestaTimes' expertly curated content. From fitness tips to medical breakthroughs, we provide actionable insights to help you lead a healthier lifestyle.Celebrities Life
Jadi, tunggu apalagi? Ayo segera bergabung dan nikmati berbagai keuntungan yang ditawarkan oleh Api77. Raih kemenangan besar Anda dan jadilah bagian dari komunitas judi online terbaik di Indonesia. Selamat bermain dan semoga sukses!Api77
Delve into the world of secure gaming with our recommended major playgrounds, endorsed by Totobit for a trustworthy gaming experience. With Major Toto sites at your fingertips, enjoy attractive odds and a diverse range of sports games in a safe gaming environment. Prioritize responsible gaming and user protection by opting for our recommended major playgrounds, ensuring fairness and integrity in every gaming session.메이저토토사이트
Experience the magic of Karishma Kapoor, an icon of Indian cinema. This biography traces her path from her storied family heritage to her own illustrious career. Learn fascinating details about her height, age, and weight, while exploring the depth of her influence on the film industry. Celebrate the enduring legacy of this Bollywood luminary and the impact she continues to make.karishma kapoor weight
Those days of purchasing costly genuine carbide inserts have faded within the wind and that is why Dijet Inserts our high-end products best carbide inserts become more popular.You will notice that we aim in the direction of offering perfect client satisfaction, Drilling Carbide Inserts examining all of marvelous best cutting tool .
It was wondering if I could use this write-up on my other website, I will link it back to your website though.Great Thanks.batara303 slot
Elevate your eye care experience in Verona with our trusted ophthalmologist. With a focus on improving your quality of life through enhanced vision, we provide comprehensive services tailored to your needs.oculista a verona
Searching for a realistic fake diploma? Look to diplomasmarket.com for a seamless experience. Our experienced team meticulously recreates certificates, ensuring every detail matches the originals. With high-quality materials and thorough proofing, our diplomas are virtually indistinguishable from real ones. Order now for worldwide delivery with reliable shipping options.fake bachelor's degree certificate
Looking for a free and easy way to watch movies online? Visit Soap2day at TheSoapGate.com for a vast collection of films to enjoy, all without signing up! soap2day.to
Share your love with BirthdayWishesText.com! Our heartfelt messages convey your warmest wishes with sincerity and affection, making birthdays truly special for your loved ones.BirthdayWishesText
Please rotate your device
We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site